package org.example.集合;

import java.util.ArrayList;
import java.util.List;

/**
 * @author mumucgq
 * @create 2020-12-22 14:57
 */
public class SubListTest {
    public static void main(String[] args) {
        ArrayList<String> names = new ArrayList<>(){
            {
                add("AAA");
                add("BBB");
                add("CCC");
                add("DDD");
                add("EEE");
                add("FFF");
            }
        };

        List subList = names.subList(2,6);
        System.out.println(subList);
        System.out.println(subList.get(1));

    }
}
